﻿using DMSkin.Core.MVVM;
using DMSkin.WeChat.API;
using DMSkin.WeChat.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;

namespace DMSkin.WeChat.ViewModel
{
    public class MainWindowViewModel : ViewModelBase
    {
        /// <summary>
        /// 当前页面
        /// </summary>
        private Page currentPage = PageManager.chatListPage;

        public Page CurrentPage
        {
            get { return currentPage; }
            set
            {
                currentPage = value;
                OnPropertyChanged("CurrentPage");
            }
        }

        /// <summary>
        /// 选中菜单
        /// </summary>
        private string selectMenu = "ChatListPage";

        public string SelectMenu
        {
            get { return selectMenu; }
            set
            {
                selectMenu = value;
                switch (selectMenu)
                {
                    case "ChatListPage":
                        CurrentPage = PageManager.chatListPage; break;
                    case "FriendPage":
                        CurrentPage = PageManager.friendPage; break;
                    case "CollectPage":
                        CurrentPage = PageManager.collectPage; break;
                    default:
                        CurrentPage = PageManager.chatListPage; break;
                }
            }
        }
    }
}
